﻿using System;
using System.ComponentModel.DataAnnotations;
using IterationLife.FootballTeaching.Enums;
using Util.Domains.Repositories;

namespace IterationLife.FootballTeaching.Queries {
    /// <summary>
    /// 课时查询实体
    /// </summary>
    public class LessonQuery : QueryEntityBase {
        /// <summary>
        /// 课时编号
        /// </summary>
        [Display(Name="课时编号")]
        public Guid? LessonId { get; set; }
        /// <summary>
        /// 章节编号
        /// </summary>
        [Display(Name="章节编号")]
        public Guid? ChapterId { get; set; }
        
        private string _name = string.Empty;
        /// <summary>
        /// 名称
        /// </summary>
        [Display(Name="名称")]
        public string Name {
            get { return _name == null ? string.Empty : _name.Trim(); }
            set{ _name=value;}
        }
        
        private string _banner = string.Empty;
        /// <summary>
        /// 封面图
        /// </summary>
        [Display(Name="封面图")]
        public string Banner {
            get { return _banner == null ? string.Empty : _banner.Trim(); }
            set{ _banner=value;}
        }
        
        private string _video = string.Empty;
        /// <summary>
        /// 视频
        /// </summary>
        [Display(Name="视频")]
        public string Video {
            get { return _video == null ? string.Empty : _video.Trim(); }
            set{ _video=value;}
        }
        /// <summary>
        /// 难度
        /// </summary>
        [Display(Name="难度")]
        public DifficultyType? Difficulty { get; set; }
        
        private string _requirement = string.Empty;
        /// <summary>
        /// 要求
        /// </summary>
        [Display(Name="要求")]
        public string Requirement {
            get { return _requirement == null ? string.Empty : _requirement.Trim(); }
            set{ _requirement=value;}
        }
        
        private string _content = string.Empty;
        /// <summary>
        /// 内容
        /// </summary>
        [Display(Name="内容")]
        public string Content {
            get { return _content == null ? string.Empty : _content.Trim(); }
            set{ _content=value;}
        }
        /// <summary>
        /// 排序号
        /// </summary>
        [Display(Name="排序号")]
        public int? SortId { get; set; }
        /// <summary>
        /// 起始创建时间
        /// </summary>
        [Display( Name = "起始创建时间" )]
        public DateTime? BeginCreationTime { get; set; }
        /// <summary>
        /// 结束创建时间
        /// </summary>
        [Display( Name = "结束创建时间" )]
        public DateTime? EndCreationTime { get; set; }        
        /// <summary>
        /// 创建人
        /// </summary>
        [Display(Name="创建人")]
        public Guid? CreatorId { get; set; }
        /// <summary>
        /// 起始最后修改时间
        /// </summary>
        [Display( Name = "起始最后修改时间" )]
        public DateTime? BeginLastModificationTime { get; set; }
        /// <summary>
        /// 结束最后修改时间
        /// </summary>
        [Display( Name = "结束最后修改时间" )]
        public DateTime? EndLastModificationTime { get; set; }        
        /// <summary>
        /// 最后修改人
        /// </summary>
        [Display(Name="最后修改人")]
        public Guid? LastModifierId { get; set; }
        
        /// <summary>
        /// 添加描述
        /// </summary>
        protected override void AddDescriptions() {
            base.AddDescriptions();
            AddDescription( "课时编号", LessonId );
            AddDescription( "章节编号", ChapterId );
            AddDescription( "名称", Name );
            AddDescription( "封面图", Banner );
            AddDescription( "视频", Video );
            AddDescription( "难度", Difficulty );
            AddDescription( "要求", Requirement );
            AddDescription( "内容", Content );
            AddDescription( "排序号", SortId );
            AddDescription( "起始创建时间", BeginCreationTime );
            AddDescription( "结束创建时间", EndCreationTime );
            AddDescription( "创建人", CreatorId );
            AddDescription( "起始最后修改时间", BeginLastModificationTime );
            AddDescription( "结束最后修改时间", EndLastModificationTime );
            AddDescription( "最后修改人", LastModifierId );
        } 
    }
}
